using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Adge.Models;
using NHibernate.Expression;
using Adge.Common;

namespace Adge.Web.UI
{
    public partial class category : AdgePageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                display();
            }
        }

        protected void display()
        {
            Adge.BLL.AdgeArBase<SubjectInfo> catlist = new Adge.BLL.AdgeArBase<SubjectInfo>();

            #region Bind Catgory

            ICriterion[] criterias = new ICriterion[] { new GtExpression("SubParent", 0) };
            SubjectInfo[] entities = catlist.SlicedFindAll(0, AdgeConfig.MaxRecordNumber, new Order[] { Order.Asc("SubOrder") }, criterias);
            list.DataSource = entities;
            list.DataBind();
            dlist.DataSource = entities;
            dlist.DataBind();
            #endregion
        }

    }
}
